//
//  DataBaseHandle.h
//  电影豆瓣--完整版
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
@class UserModel;
@class MyModel;

@interface DataBaseHandle : NSObject {
   
    sqlite3 *dbPoint;
}

+ (DataBaseHandle *)sharedDataBaseHandle;

- (void)openDB;

- (void)createTable;

- (void)insertModel:(MyModel *)model table:(NSString *)tableName;

- (void)deleteModel:(MyModel *)model table:(NSString *)tableName;

- (NSMutableArray *)selectModel:(MyModel *)model table:(NSString *)tableName;

- (NSMutableArray *)selectAllFromtable:(NSString *)tableName;


- (void)insertUserModel:(UserModel *)model;

- (UserModel *)selectUser:(NSString *)userName;

- (void)updateTable:(UserModel *)model;

- (UserModel *)selectUserState:(NSString *)userState;


@end
